import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'
import {createRouter ,createWebHistory} from 'vue-router'
import Login from '@/views/Login.vue'
import Layout from '@/views/Layout.vue'
import ArticleCategory from '@/views/article/ArticleCategory.vue'
import ArticleManage from '@/views/article/ArticleManage.vue'
import UserAvatar from '@/views/user/UserAvatar.vue'
import UserInfo from '@/views/user/UserInfo.vue'
import UserResetPassword from '@/views/user/UserResetPassword.vue'
const routers = [
    {
        path:'/login',
        component:Login
    },
    {
        path:'/',
        component:Layout,
        redirect: '/article/ArticleCategory',
        children:[
            {
                path:'/article/ArticleCategory',
                component: ArticleCategory
            },
            {
                path:'/user/UserAvatar',
                component: UserAvatar
            },
            {
                path:'/article/ArticleManage',
                component: ArticleManage
            },
            {
                path:'/user/UserInfo',
                component: UserInfo
            },
            {
                path:'/user/UserResetPassword',
                component: UserResetPassword
            }
        ]
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes:routers
})

export default router;